import http from '@/utils/http'
import type * as T from './type'

export type * from './type'

const BASE_URL = '/asset/device/brand'


/** @desc 查询设备品牌列表 */
export function listDeviceBrand(query: T.DeviceBrandPageQuery) {
  return http.get<T.DeviceBrandResp[]>(`${BASE_URL}/list`, query)
}

/** @desc 查询设备品牌详情 */
export function getDeviceBrand(id: string) {
  return http.get<T.DeviceBrandDetailResp>(`${BASE_URL}/${id}`)
}

/** @desc 新增设备品牌 */
export function addDeviceBrand(data: any) {
  return http.post(`${BASE_URL}`, data)
}

/** @desc 修改设备品牌 */
export function updateDeviceBrand(data: any, id: string) {
  return http.put(`${BASE_URL}/${id}`, data)
}

/** @desc 删除设备品牌 */
export function deleteDeviceBrand(id: string) {
  return http.del(`${BASE_URL}/${id}`)
}

/** @desc 导出设备品牌 */
export function exportDeviceBrand(query: T.DeviceBrandQuery) {
  return http.download<any>(`${BASE_URL}/export`, query)
}